package com.xo.user;


import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

@SpringBootApplication
@Slf4j
@MapperScan("com.xo.user.mapper")
public class XoUserApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(XoUserApplication.class, args);
        Environment environment = context.getBean(Environment.class);
        String port = environment.getProperty("server.port");
        log.info("文档地址：http://localhost:{}/doc.html", port);
        log.info("文档地址：http://localhost:{}/swagger-ui.html", port);
    }

}
